package com.hongxin.nw.netty.values;

/**
 * @remark 静态常量
 * @author: GuoXiaolin
 * @date 2019/5/17 11:26
 * @Version 1.0
 * @Descibe
 */
public class StaticValue {

    //设备心跳时间
    public final static int hbTime = 15;

    //登录协议标志
    public final static String LOGIN_IDENTIFY = "681600ff";

    //业务系统返回成功码
    public final static int SUCCESS = 200;//成功

    //南网协议返回成功码
    //远程启动充电执行结果
    public final static String START_CONFIRM = "0";//执行结果	BIN码	1BYTE	0：确认 1：成功；2：失败
    public final static String START_SUCCESS = "1";//执行结果	BIN码	1BYTE	0：确认 1：成功；2：失败
    public final static String START_FAIL = "2";//执行结果	BIN码	1BYTE	0：确认 1：成功；2：失败
    //充电鉴权下行数据
    public final static String VERIFY_FAIL = "0";// 布尔型（1，鉴权成功；0，鉴权失败）
    public final static String VERIFY_SUCCESS = "1";// 布尔型（1，鉴权成功；0，鉴权失败）
    //其他执行结果
    public final static int E_SUCCESS = 0;//最高位：0：成功；1：失败, 低7位：失败原因, 1:SM4密钥错误 ,127:其它原因(0b00000000)
    public final static int SM4_FAIL = 1;//最高位：0：成功；1：失败, 低7位：失败原因, 1:SM4密钥错误 ,127:其它原因(0b???????1)

    //鉴权启动和远程启动需要此字段告知设备使用临时计费策略
    //0:数据不包含计费模型, 1:数据包含计费模型
    public final static String JF = "01";

    //补零方向
    public final static int DIRECTION_LEFT = 0;//左边
    public final static int DIRECTION_RIGHT = 1;//右边

    //U格式,控制域首字节
    public final static int U_TEST_OK = 0b10000011;//TEST  确认
    public final static int U_TEST_V =  0b01000011;//TEST 激活
    public final static int U_STOP_OK = 0b00100011;//STOP  确认
    public final static int U_STOP_V =  0b00010011;//STOP  激活
    public final static int U_START_OK = 0b00001011;//START  确认
    public final static int U_START_V = 0b00000111; //START  激活

    /**
     * SQ = 单个或顺序: = BS1[8]<0…1>;
     * SQ位规定寻址后续信息对象或单个信息元素/信息元素集和的办法.
     * <0>: = 寻址同一类型的许多信息对象中单个的信息元素或者信息元素的集合;
     * <1>: = 寻址ASDU单个信息对象中顺序的单个信息元素或信息元素的同类集合;
     */
    //表示:[{信息对象地址1,信息元素1},{信息对象地址2,信息元素2},{信息对象地址3,信息元素3}]
    public final static int SQ0 = 0;
    //表示:{信息对象地址1: {信息元素1},{信息元素2},{信息元素3},{信息元素4},{信息元素5}}
    public final static int SQ1 = 1;

    //qds==1 表示警告信息异常,0:表示正常
    public static final String QPS = "1";

    //默认vsq == 1,数量
    public final static int  DEFAULT_VSQ = 1;


    public final static String VAL_NULL = "NULL";
    public final static String VAL_1 = "不发送MQ(充电设备收到计数量总召命令后已上传累积量)";
    public final static String VAL_2 = "不发送MQ(时钟同步已确认)";
    public final static String VAL_3 = "不发送MQ(远程升级已确认)";
    public final static String VAL_4 = "不发送MQ(计数量总召已确认)";
    public final static String VAL_5 = "不发送MQ(计数量总召已结束)";
    public final static String VAL_6 = "不发送MQ(总召已结束)";
    public final static String VAL_7 = "不发送MQ(总召已确认)";
    public final static String VAL_8 = "不发送MQ(协议无需发送)";
    public final static String VAL_9 = "不发送MQ(设备请求鉴权)";
    public final static String VAL_10 = "不发送MQ(设备请求请求计费模型下发)";
    public final static String VAL_11 = "不发送MQ(设备通知更新充电设备的黑名单状态)";
    public final static String VAL_12 = "不发送MQ(远程功率控制)";
    public final static String VAL_13 = "不发送MQ(下发计费模型结果数据)";
    public final static String VAL_14 = "不发送MQ(充电设备数据上报参数设置结果)";
    public final static String VAL_15 = "不发送MQ(远程终止充电确认)";
    public final static String VAL_16 = "不发送MQ(远程升级启动确认)";
    public final static String VAL_17 = "不发送MQ(充电设备业务数据为空)";
    public final static String VAL_18 = "不发送MQ(协议134交流设备实时监测数据)";
    public final static String VAL_19 = "不发送MQ(协议134直流设备实时监测数据)";
    public final static String VAL_20 = "不发送MQ(充电设备实时监测数据为空)";
    public final static String VAL_23 = "不发送MQ(远程启动失败108)";
    public final static String VAL_33 = "不发送MQ(启动应答成功)";

    public final static String VAL_21 = "该指令无须应答";
    public final static String VAL_22 = "应答确认成功";
    public final static String VAL_24 = "发送MQ(开始充电108)";
    public final static String VAL_25 = "发送MQ(交流设备功率204)";
    public final static String VAL_26 = "发送MQ(交流设备状态信息104)";
    public final static String VAL_27 = "发送MQ(交流设备信息302)";
    public final static String VAL_28 = "发送MQ(直流设备功率信息)";
    public final static String VAL_29 = "发送MQ(结束充电账单信息202)";
    public final static String VAL_30 = "发送MQ(直流设备告警信息204)";
    public final static String VAL_31 = "发送MQ(充电过程中信息110)";
    public final static String VAL_32 = "发送MQ(直流设备信息302)";

}
